home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
c
/
ldb.zip
/
SDATA.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1991-10-18
|
1KB
|
63 lines
/*
sdata.hpp
10-18-91
Streamable Data: Loose Data Binder v1.4
Copyright 1991
John W. Small
All rights reserved
PSW / Power SoftWare
P.O. Box 10072
McLean, Virginia 22102 8072 USA
John Small
Voice: (703) 759-3838
CIS: 73757,2233
*/
#ifndef SDATA_HPP
#define SDATA_HPP
#ifndef SBINDER_HPP
#include "sbinder.hpp"
#endif
class SData;
typedef SData * SDatA;
#define SDatA0 ((SDatA)0)
#define ID_SData 2
#define DID_Generic 0
#define DID_String 1
class SData : Streamable {
unsigned sizeofData, Did;
int dup;
voiD D;
protected:
void construct(voiD D, unsigned sizeofData,
unsigned Did, int dup);
public:
STREAMABLE(SData,ID_SData,
Streamable);
SData(voiD D = voiD0,
unsigned sizeofData = 0,
unsigned Did = DID_Generic,
int dup = 1)
: Streamable(UNIQUE_STREAMABLE,
ID_CLASS)
{ construct(D,sizeofData,Did,dup); }
SData(char * s, int dup = 1);
operator voiD() { return D; }
unsigned SizeofData()
{ return sizeofData; }
unsigned DID() { return Did; }
~SData() { if (dup) delete D; }
};
#endif